package com.suse.common.util.core;

public class StringUtil {

    public static boolean isEmpty(String s) {
        return s == null || "".equals(s.trim()) || "null".equals(s);
    }

    public static boolean isNotEmpty(String s) {
        return !(s == null || "".equals(s.trim()) || "null".equals(s));
    }

    public static boolean isNotNull(String s) {
        return !(s == null);
    }

    public static boolean isNull(String s) {
        return s == null;
    }

    public static boolean isBlank(String s) {
        return "".equals(s);
    }

    public static boolean isEquals(String s1,String s2) {
        if (s1 == null || s2 == null) return false;
        return s1.equals(s2);
    }

    public static boolean isEqualsIgnoreCase(String s1,String s2) {
        if (s1 == null || s2 == null) return false;
        return s1.equalsIgnoreCase(s2);
    }

    public static boolean isNotEquals(String s1,String s2) {
        if (s1 == null || s2 == null) return true;
        return ! s1.equals(s2);
    }

    public static boolean isNotEqualsIgnoreCase(String s1,String s2) {
        if (s1 == null || s2 == null) return true;
        return ! s1.equalsIgnoreCase(s2);
    }

}
